package com.dong.datachangecontrol.demo.controller;

import com.dong.datachangecontrol.demo.entity.Person;
import com.dong.datachangecontrol.demo.service.PersonService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/person")
public class PersonController {
    @Autowired
    private PersonService personService;
    @RequestMapping("/getPersonList")
    List<Person> getPersonList(){
        List<Person> personList = personService.getPersonList();
        return personList;
    }
   /* Person updatePerson(Person person);
    Person deleteById(Integer id);
    Person addPerson(Person person);
    Person getById(Integer id);*/
}
